<%@ page language="java" contentType="text/html;charset=UTF-8" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="html" uri="http://struts.apache.org/tags-html" %>
<%@ taglib prefix="bean" uri="http://struts.apache.org/tags-bean" %>
<%@ taglib prefix="logic" uri="http://struts.apache.org/tags-logic" %>
<%@ taglib prefix="nested" uri="http://struts.apache.org/tags-nested" %>
<html>
<head>
<title>메세지</title>
<link href="<%=request.getContextPath()%>/common/css/message.css" type="text/css" rel="stylesheet"/>
</head>
<body onload="resizeWindow()">
<table style="width: 350px;vertical-align: top;" cellpadding="0" cellspacing="0">
	<tr>
		<td style="width: 350px;height: 20px;vertical-align: top;">
			<%@ include file="./messagenavi.jsp" %>
		</td>
	</tr>
		<tr>
			<td style="text-align: center;border: 1px solid #355884;border-top:1px solid #8db1dd;border-left:1px solid #8db1dd;height: 200px;">
				<html:form action="/message">
					<logic:notEmpty name="messageForm" property="receive">
						<bean:write name="messageForm" property="receive"/>님에게  쪽지가 전송되었습니다.
					</logic:notEmpty>
					
					<logic:empty name="messageForm" property="mno">
						쪽지 전송이 실패하였습니다.
					</logic:empty>
				</html:form>						
				
			</td>
		</tr>
		<tr><td style="text-align: right;padding-right: 5px;">
			<html:link href="javascript: window.close();">[닫기]</html:link></td>
		</td></tr>
	</table>
	
</body>
</html>
<script type="text/javascript">
<!--
	function checkForm(){
		var form1 = document.messageForm.receive.value.replace(/\s/g,"");
		var form2 = document.messageForm.message.value.replace(/\s/g,"");
		if(form1==""){
			alert("받는 사람을 입력하시오");
			document.messageForm.receive.focus();
			return;
		}
		if(form2==""){
			alert("내용을 입력하시오");	
			document.messageForm.message.focus();
			return;
		}
		messageForm.submit();
	}	
	
//-->
</script>


